/*
 * sw_drv.h
 *
 * Created: 05.03.2013 21:36:49
 *  Author: Timmo
 */ 


#ifndef SW_DRV_H_
#define SW_DRV_H_

#define KEY_NONE	0
#define KEY_OK		0
#define KEY_LEFT	1
#define KEY_UP		2
#define KEY_RIGHT	3
#define KEY_DOWN	4

#define REPEAT_MASK     (1<<KEY_OK)       // repeat: key0
#define REPEAT_START    50              // after 500ms
#define REPEAT_NEXT     20              // every 200ms

uint8_t read_sw(void);
uint8_t get_key_press( uint8_t key_mask );
uint8_t get_key_short( uint8_t key_mask );
uint8_t get_key_rpt( uint8_t key_mask );
uint8_t get_key_long( uint8_t key_mask );


#endif /* SW_DRV_H_ */